package com.bdk.dao;

import com.bdk.mapper.Role;
import com.bdk.mapper.RoleExample;


import com.bdk.model.RoleVO;

import java.util.List;

import org.apache.ibatis.annotations.Param;

public interface RoleMapper {
	
	//1、分页条件查询
   List<Role>	queryRoleListPages(RoleVO roleVo);
	//2、查询总数量
   public int queryTotal(@Param("roleName")String roleName);
	/**
	 * 
	 * 2017年10月22日上午11:35:24
	 * 说明：查询所用角色
	 * @return
	 */
   List<Role> queryRoleList();
  /**
	 * 
	 * 2017年10月22日上午11:35:24
	 * 说明：通过id主键删除
	 * @return
	 */
  int deleteByPrimaryKey(String roleId);
  
  
  /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table p_role
     *
     * @mbg.generated
     */
    int deleteByExample(RoleExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table p_role
     *
     * @mbg.generated
     */
    int insert(Role record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table p_role
     *
     * @mbg.generated
     */
    int insertSelective(Role record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table p_role
     *
     * @mbg.generated
     */
    List<Role> selectByExample(RoleExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table p_role
     *
     * @mbg.generated
     */
    int updateByExampleSelective(@Param("record") Role record, @Param("example") RoleExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table p_role
     *
     * @mbg.generated
     */
    int updateByExample(@Param("record") Role record, @Param("example") RoleExample example);
    
    Role findbyId(RoleVO rolevo);
    
    //3、更新角色
    int updateByPrimaryKeySelective(RoleVO rolevo);
}
